package marina;

public class J12Fan {
//Fan 클래스 만들기
	public static void main(String[] args) {
		System.out.println("test1");
		Fan test1 = new Fan();
		test1.radius = 10;
		test1.color = "Yellow";
		test1.speed = test1.FAST;
		test1.on = true;
		System.out.println(test1.toString());
		System.out.println("test1");
		Fan test2 = new Fan();
		test2.radius = 5;
		test2.color = "Blue";
		test2.speed = test1.MEDIUM;
		test2.on = false;
		System.out.println(test2.toString());
	}

}

class Fan {
	final int SLOW = 1;
	final int MEDIUM = 2;
	final int FAST = 3;
	
	int speed = SLOW;
	boolean on = false;
	double radius = 5.0;
	String color = "blue";
	String fanInfo = "";
	
	public String toString() {
		if(on == false){
			fanInfo = color + "," + radius + "," + "꺼져 있음";
		} else if(on == true){
			fanInfo = speed + "," + color + "," + radius + "," + "작동 중";
		}
		return fanInfo;
	}
}